package com.itfs.strategyDdemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class CoffeeContext {
    @Autowired
    private Map<String,CoffeeStrategy> coffeeStrategyMap;

    public void getCoffee(String size) {
        this.coffeeStrategyMap.get(size).offer();
    }
}
